#ifndef QTTABLEMODEL2_H
#define QTTABLEMODEL2_H

#include <QtGui/QMainWindow>
#include <QStandardItemModel>
#include <QSortFilterProxyModel>
#include <QTableWidgetItem>
#include <QItemSelectionModel>
#include "ui_qttablemodel2.h"

class qtTableModel2 : public QMainWindow
{
	Q_OBJECT

public:
	qtTableModel2(QWidget *parent = 0, Qt::WFlags flags = 0);
	~qtTableModel2();

	QStandardItemModel* model;
	QSortFilterProxyModel* proxyModel;
	QItemSelectionModel* selectionModel;

	void createModel();
	void insertRow(const QString &firstName,const QString &lastName, const QString &email);

private:
	Ui::qtTableModel2Class ui;

private slots:
	void on_lineEdit_3_textChanged(const QString &);
	void on_pushButton_clicked();
	void searchChanged();
	void rowSelected(const QModelIndex& ,const QModelIndex&);

};

#endif // QTTABLEMODEL2_H
